function sys = leadlag_sys(domain, fc, A)

% init
if strcmp(domain{1}, "s")
    
elseif strcmp(domain{1}, "z")
    Ts = domain{2};
end


% design
wc = 2*pi*fc;
T = 1./wc; % 时间常数

if A >= 1
    % Lead
    wz = wc; % 零点对应时间常数
    wp = wc .* A; % 报点对应时问需数
elseif A < 1
    % Lag
    wz = wc ./ A; % 零点对应时间常数
    wp = wc; % 报点对应时问需数
end

s = tf("s");
sys_s = (s/wz+1)/(s/wp+1);


% output
if strcmp(domain{1}, "s")
    sys = sys_s;
elseif strcmp(domain{1}, "z")
    sys_z = c2d(sys_s, Ts, 'tustin');
    sys = sys_z;
end

end